//
//  MoreViewController.swift
//  FirstSwiftProduct
//
//  Created by 知合金服-Mini on 2017/12/6.
//  Copyright © 2017年 范泽华. All rights reserved.
//

import UIKit

class MoreViewController: BasePushViewController ,UITableViewDelegate,UITableViewDataSource{

    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
        if indexPath.row == 2 {
            return 60
        }
        return 44
    }
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return 3
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        
       
        
        var cell = tableView.dequeueReusableCell(withIdentifier: "cellId")
        if cell == nil{
           cell = UITableViewCell.init(style: .value1, reuseIdentifier: "cellId")
        }
        cell?.textLabel?.text = titleArr[indexPath.row]
        cell?.detailTextLabel?.text = titleArr[indexPath.row + 3]
        cell?.detailTextLabel?.font = UIFont.systemFont(ofSize: 14)
        cell?.detailTextLabel?.numberOfLines = 0
        cell?.accessoryType = .disclosureIndicator
        cell?.selectionStyle = .none
        return cell!
    }
    
    var tableView : UITableView!
    let titleArr = ["性别","地区","个性签名","男","浙江 杭州","凡事不以恶意揣度别人，不诋毁他人，也不妄自菲薄。"]
    override func viewDidLoad() {
        super.viewDidLoad()
        
        // Do any additional setup after loading the view.
        
        tableView = UITableView.init(frame: CGRect(x: 0, y: CGFloat(kStatus_Navigation_height + 20), width: SCREEN_WIDTH, height: SCRENN_HEIGHT - CGFloat(kStatus_Navigation_height + 20)), style: .plain)
        tableView.delegate = self
        tableView.dataSource = self
        tableView.backgroundColor = kBgDarkColor
        view.backgroundColor = kBgDarkColor
        tableView.tableFooterView = UIView.init()
        view.addSubview(tableView)
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
